import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Role from "./views/nav2/Permission.vue";
import Permission from "./views/nav2/Role.vue";
import echarts from "./views/charts/echarts.vue";
import DepManagement from "./views/nav1/DepManagement.vue";
import UserManagement from "./views/nav1/UserManagement.vue";
import NoPermission from "./views/NoPermission.vue";
import Shop from "./views/nav1/Shop.vue";
import ShopRegister from "./views/ShopRegister.vue";
import carType from "./views/car/carType.vue";
import Car from "./views/car/Car.vue";

import table from "./views/test/Table.vue";
import Announcement from "./views/announcement/Announcement.vue";

let routes = [
    {
        path: '/table',
        component: table,
        name: '',
        hidden: true
    },
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/shopRegister',
        component: ShopRegister,
        name: 'ShopRegister',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    //{ path: '/main', component: Main },
    {
        path: '/',
        component: Home,
        name: "组织机构管理",
        iconCls: 'el-icon-s-management',//图标样式class
        children: [
            { path: '/dep_management', component: DepManagement, name: '部门管理' },
            { path: '/user_management', component: UserManagement, name: '员工管理' },
            { path: '/shop',component: Shop,name:'店铺管理'},
            {path:'/announcement', component: Announcement,name:'公告管理'}
        ]
    },
    {
        path: '/',
        component: Home,
        name: "permission",
        iconCls: 'el-icon-message',//图标样式class
        hidden: true,
        children: [
            { path: '/no_permission', component: NoPermission, name: '没权限',hidden: true },
        ]
    },
    {
        path: '/',
        component: Home,
        name: "车辆管理",
        iconCls: 'el-icon-monitor',//图标样式class
        children: [
            { path: '/carType', component: carType, name: '车辆类型'},
            { path:'/car',component: Car,name: '车辆列表'},
        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统管理',
        iconCls: 'el-icon-user',
        leaf: false,//只有一个节点
        children: [
            { path: '/role', component: Role, name: '角色管理' },
            { path: '/permission', component: Permission, name: '权限管理' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: 'Charts',
        iconCls: 'fa fa-bar-chart',
        hidden: false,
        children: [
            { path: '/charts', component: echarts, name: 'echarts' }
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;